#ifndef _VEC2_HPP
#define _VEC2_HPP

namespace phx
{

class vec2b
{
public:
	vec2b(unsigned char x = 0, unsigned char y = 0){this->x = x; this->y = y;}
	vec2b(const vec2b &other){x = other.x; y = other.y;}
	void operator=(const vec2b &other){x = other.x; y = other.y;}
	vec2b operator/(const unsigned char value){return vec2b(x / value, y / value);}
	void operator/=(const unsigned char value){x /= value; y /= value;}
	union{unsigned char x, width;};
	union{unsigned char y, height;};
};


class vec2i
{
public:
	vec2i(int x = 0, int y = 0){this->x = x; this->y = y;}
	vec2i(const vec2i &other){x = other.x; y = other.y;}
	void operator=(const vec2i &other){x = other.x; y = other.y;}
	vec2i operator/(const int value){return vec2i(x / value, y / value);}
	void operator/=(const int value){x /= value; y /= value;}
	union{int x, width;};
	union{int y, height;};
};

class vec2ui
{
public:
	vec2ui(unsigned int x = 0U, unsigned int y = 0U){this->x = x; this->y = y;}
	vec2ui(const vec2ui &other){x = other.x; y = other.y;}
	void operator=(const vec2ui &other){x = other.x; y = other.y;}
	vec2ui operator/(const unsigned int value){return vec2ui(x / value, y / value);}
	void operator/=(const unsigned int value){x /= value; y /= value;}
	union{unsigned int x, width;};
	union{unsigned int y, height;};
};

class vec2f
{
public:
	vec2f(float x = 0.0f, float y = 0.0f){this->x = x; this->y = y;}
	vec2f(const vec2f &other){x = other.x; y = other.y;}
	void operator=(const vec2f &other){x = other.x; y = other.y;}
	vec2f operator/(const float value){return vec2f(x / value, y / value);}
	void operator/=(const float value){x /= value; y /= value;}
	union{float x, width;};
	union{float y, height;};
};

class vec2d
{
public:
	vec2d(double x = 0.0, double y = 0.0){this->x = x; this->y = y;}
	vec2d(const vec2d &other){x = other.x; y = other.y;}
	void operator=(const vec2d &other){x = other.x; y = other.y;}
	vec2d operator/(const double value){return vec2d(x / value, y / value);}
	void operator/=(const double value){x /= value; y /= value;}
	union{double x, width;};
	union{double y, height;};
};

class vec2l
{
public:
	vec2l(long x = 0L, long y = 0L){this->x = x; this->y = y;}
	vec2l(const vec2l &other){x = other.x; y = other.y;}
	void operator=(const vec2l &other){x = other.x; y = other.y;}
	vec2l operator/(const long value){return vec2l(x / value, y / value);}
	void operator/=(const long value){x /= value; y /= value;}
	union{long x, width;};
	union{long y, height;};
};

class vec2ul
{
public:
	vec2ul(unsigned long x = 0UL, unsigned long y = 0UL){this->x = x; this->y = y;}
	vec2ul(const vec2ul &other){x = other.x; y = other.y;}
	void operator=(const vec2ul &other){x = other.x; y = other.y;}
	vec2ul operator/(const unsigned long value){return vec2ul(x / value, y / value);}
	void operator/=(const unsigned long value){x /= value; y /= value;}
	union{unsigned long x, width;};
	union{unsigned long y, height;};
};

}

#endif